package com.lzy.cloud.ribbon.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

/**
 * Created with IntelliJ IDEA.
 * Description: lzy-cloud-service
 *
 * @author: ellengou
 * @date: 2018-05-28 星期一
 * @time: 14:48
 */
@Service
public class HelloService {

    @Autowired
    RestTemplate restTemplate;

    @Autowired
    DiscoveryClient discoveryClient;

    public String helloService() {
        return restTemplate.getForObject("http://LZY-CLOUD-PRODUCER/dc", String.class);
    }
}